import request from '/@/utils/request';

const workable_api = import.meta.env.VITE_WORKABLE_API as string;

/**
 * 获取连线信息管理列表
 * @param params 
 */
export function getWorkableLineList(params?: object){
    return request({
        url: workable_api + '/line/list',
        method: 'get',
        params: params
    })
}

/**
 * 获取连线信息
 * @param params 
 */
export function getWorkableLine(params?: object){
    return request({
        url: workable_api + '/line/info',
        method: 'get',
        params: params
    })
}

/** 新增连线信息 */
export function addWorkableLine(params? : object){
    return request({
        url: workable_api + '/line/add',
        method: 'post',
        data: params
    });
}

/** 修改连线信息 */
export function editWorkableLine(params?: object) {
    return request({
        url: workable_api + '/line/edit',
        method: 'post',
        data: params
    });
}

/** 删除连线信息 */
export function delWorkableLine(params?: object){
    return request({
        url: workable_api + '/line/remove',
        method: 'post',
        data: params
    });
}
